<?php

error_reporting(E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR);
require('./roots.php');
require($root_path.'include/inc_environment_global.php');
require_once($root_path.'modules/rbac/classes/rbac.php');
//$_SESSION['sess_path_referer']=str_replace($doc_root.'/','',__FILE__);
//echo __FILE__;

define('LANG_FILE','startframe.php');
define('NO_2LEVEL_CHK',1);
require_once($root_path.'include/inc_front_chain_lang.php');

require_once($root_path.'gui/smarty_template/smarty_care.class.php');

$thisfile=basename(__FILE__);
$breakfile=$root_path.'main/login.php.php';
$action=$root_path.'modules/news/start_page.php'.URL_APPEND;

if(isset($_SESSION['sess_login_username'])){
//echo "antes";
if(isset($_SESSION['roles'])){

	header("Location:".$root_path."modules/news/start_page.php?sid=$sid&lang=$lang");
	exit;
}else{

$rbac= new rbac();

$gui=$rbac->Buscar_rol_usuario1(NULL,$_SESSION['sess_login_username'],$_SESSION['sess_login_username']);

$smarty = new smarty_care('common');

$mensaje=$_GET['msn'];
if($mensaje){
$smarty->assign('selectOp',$LDselectOp);
}

$smarty->assign('sRegFormJavaScript',$sTemp);
$smarty->assign('sToolbarTitle',$LDTitulo);
$smarty->assign('title',$LDTitulo);
$smarty->assign('gui',$gui);
$smarty->assign('action',$action);
$smarty->assign('pbSubmit','<input type="image" '.createLDImgSrc($root_path,'savedisc.gif','0').'  alt="'.$LDSaveData.'" align="absmiddle">');


$smarty->assign('sMainBlockIncludeFile',$root_path.'gui/smarty_template/templates/default/sesion/sesion.tpl');

 /**
 * show Template
 */
$smarty->display('common/mainframe.tpl');
}
}else{
header("Location:".$root_path."modules/news/start_page.php?noti=1&sid=$sid&lang=$lang");
exit;
}
?>
